<template>
  <div class="screen" v-if="dataView">
    <!-- <dv-flyline-chart-enhanced :config="config" style="width:100%;height:100%;" /> -->
    <div class="header">
      <img src="../../assets/img/header.png" style="width: 100%;" />
      <div class="headerInfo">
        <div style="margin-left: 50px;display: flex;">
          <i class="el-icon-full-screen" @click="toggleFullScreen" style="color:#19f5ff;font-size: 20px"></i>
          <div style="margin-left: 30px;">你好，{{ username }}</div>
        </div>
        <div style="display: flex;align-items: center;margin-right: 50px">
          <div>
            {{ dateNow }}
          </div>
          <img src="../../assets//img/enter.png" style="width: 100px;cursor: pointer;margin-left:20px"
               @click="closeData" />
        </div>
      </div>
    </div>
    <div class="flex">
      <div class="tiemSearch">
        <img src="../../assets/img/time.png" style="width: 64px;">
        <el-date-picker popper-class='date' class="date" style="height:40px;margin:0 24px" v-model="selectTime"
                        type="daterange" size='small' align="right" unlink-panels range-separator="至"
                        start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
        </el-date-picker>
        <img src="../../assets/img/search.png" @click="timeSelect" style="height: 48px;width: 108px;">
      </div>
      <div class="warehouseList">
        <div v-for="(v, i) in warehouseList" :key="v.area" class="warehouseItem"
             :class="{ active: activeList.includes(i) }" @click="setWarehouse(v.area,i)">
          {{ v.areaName }}
        </div>
        <div class="warehouseItem" @click="refreshWare">所有仓库
        </div>
      </div>
    </div>
    <div class="info">
      <div>
        <div class="newOrderAmount">
          <div class="moving-element"></div>
          <div class="echartTitle">
            <div class="echartTitleText">
              <div>新店销售</div>
              <div>New Store Sales</div>
            </div>
            <div class="echartTitleLine"></div>
          </div>
          <div style="width: 100%;height: 310px;">
            <echart id="newChart" :echartsData="newStoreSales" v-if="newStoreSales.xAxis[0].data"
                    style="height: 100%;"></echart>
          </div>
        </div>
        <div class="oldOrderAmount">
          <div class="echartTitle">
            <div class="echartTitleText">
              <div>老店销售</div>
              <div>old Store Sales</div>
            </div>
            <div class="echartTitleLine"></div>
          </div>
          <div style="width: 100%;height: 310px;">
            <!--            <echart :echartsData="oldStoreSales" v-if="oldStoreSales.xAxis[0].data" style="height: 100%;"></echart>-->
            <echart :echartsData="oldStoreSales" v-if="oldStoreSales.xAxis[0].data" style="height: 100%;"></echart>
          </div>
        </div>
      </div>
      <div class="mapBg">
        <div class="map">
          <div class="item" :style="{ top: v.top, left: v.left }" v-for="(v, i) in mapWarehouseList" :key="i">
            <div class="point">
              <div class="dotted"></div>
              <div class="dotted1"></div>
              <div class="dotted2"></div>
              <div class="dotted3"></div>
            </div>
            <div class="name">{{ v.areaName }}</div>
            <div class="warehouseInfo">
              <div>负责人:{{ v.human }}</div>
              <div style="margin-top: 10px;"> 手机:{{ v.mobile }}</div>
            </div>
          </div>
        </div>
        <div class="dataCount">
          <div>
            <div>订单总数</div>
            <div>
              <countTo :startVal="0"
                       style="font-size: 24px;font-weight:800;text-align: center; color:#19f5ff"
                       :endVal=homeData.orderCount />
            </div>
            <div class="compare"><span>今日：{{ homeData.todayOrderCount }}</span><span>昨日：{{
                homeData.yesterdayOrderCount
              }}</span></div>
          </div>
          <div>
            <div>销售金额</div>
            <div>
              <countTo :startVal="0" :decimals="2"
                       style="font-size: 24px;font-weight:800;text-align: center;" :endVal=homeData.saleMoney />
            </div>
            <div class="compare"><span>今日：{{
                homeData.todaySaleMoney
              }}</span><span>昨日：{{ homeData.yesterdaySaleMoney }}</span></div>
          </div>
          <div>
            <div>售后总数</div>
            <div>
              <countTo :startVal="0" style="font-size: 24px;font-weight:800;text-align: center;"
                       :endVal=homeData.afterCount />
            </div>
            <div class="compare">
              <span>今日：{{ homeData.todayAfterCount }}</span><span>昨日：{{ homeData.yesterdayAfterCount }}</span></div>
          </div>
          <div>
            <div>售后金额</div>
            <div>
              <countTo :startVal="0" style="font-size: 24px;font-weight:800;text-align: center;"
                       :endVal=homeData.afterMoney />
            </div>
            <div class="compare">
              <span>今日：{{ homeData.todayAfterMoney }}</span><span>昨日：{{ homeData.yesterdayAfterMoney }}</span></div>
          </div>
          <div>
            <div>品牌方台账</div>
            <div>
              <countTo :startVal="0" :decimals="2"
                       style="font-size: 24px;font-weight:800;text-align: center;" :endVal=homeData.brandBookMoney />
            </div>
            <div class="compare">
              <span>今日：{{ homeData.todayBrandBookMoney }}</span><span>昨日：{{ homeData.yesterdayBrandBookMoney }}</span>
            </div>
          </div>
          <div>
            <div>仓库台账</div>
            <div>
              <countTo :startVal="0" :decimals="2"
                       style="font-size: 24px;font-weight:800;text-align: center;" :endVal=homeData.areaBookMoney />
            </div>
            <div class="compare">
              <span>今日：{{ homeData.todayAreaBookMoney }}</span><span>昨日：{{ homeData.yesterdayAreaBookMoney }}</span>
            </div>
          </div>
        </div>
      </div>
      <div>
        <div class="warehouseOrder">
          <div class="echartTitle">
            <div class="echartTitleText">
              <div>门店数量</div>
              <div>Store Count</div>
            </div>
            <div class="echartTitleLine"></div>
          </div>
          <div style="width: 100%;height: 310px;">
            <echart :echartsData="storeCount" v-if="storeCount.xAxis.data" style="height: 100%;"></echart>
          </div>
        </div>
        <div class="saleType">
          <div class="echartTitle">
            <div class="echartTitleText">
              <div>售后类型</div>
              <div>AfterSale Types</div>
            </div>
            <div class="echartTitleLine"></div>
          </div>
          <div style="width: 100%;height: 310px;">
            <echart :echartsData="afterSalePie" v-if="afterSalePie" style="height: 100%;margin-top: 40px"></echart>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div v-else style="width: 100%;height: 100%;">
    <img src="@/assets/img/notfound.png"
         style="width: 500px;height:500px;position: relative;top:50%;left:50%;transform: translate(-50%,-50%);" />
  </div>
</template>

<script>
import dayjs from 'dayjs';
import screenfull from 'screenfull'
import echart from '@/RayComponents/echart.vue'
import countTo from 'vue-count-to';
import autofit from 'autofit.js';

export default {
  components: {
    echart,
    countTo
  },
  data() {
    return {
      selectTime: '',
      storeCountX: [],
      storeCountS: [],
      oldS: [],
      oldX: [],
      newSaleSeries: [],
      newSalesData: [],
      oldSaleSeries: [],
      oldSalesData: [],
      homeData: {},
      warehouseList: [],
      newStoreSales: {
        title: {
          subtext: '单位： 元',
          subtextStyle: {//设置副标题
            color: '#a6cdff'
          }
        },
        tooltip: {
          trigger: "axis",
        },
        calculable: true,
        xAxis: [
          {
            type: "category",
            axisLine: {
              lineStyle: {
                color: '#a6cdff'
              },
            },
            // axisLabel: {
            //   color: '#fff' // xAxis 上文字的颜色
            // },
            boundaryGap: false,
            data: this.newSalesData
          },
        ],
        grid: {
          x: 0,
          y: 45,
          x2: 20,
          y2: 0,
          containLabel: true
        },
        yAxis: [
          {
            type: "value",
            axisLabel: {
              formatter: "{value}"
            },
            axisLine: {
              lineStyle: {
                color: '#a6cdff'
              }
            },
          }
        ],
        series: [
          {
            name: "销售额",
            type: "line",
            data: this.newSaleSeries,
            // markPoint: {
            //   data: [
            //     { type: "max", name: "最大值" },
            //     { type: "min", name: "最小值" }
            //   ]
            // },
            label: {
              show: true, // 显示数据标签
              color: '#fff', // 设置数据标签文字颜色为红色
              position: 'top' // 设置数据标签的位置为拐点上方
            },
            itemStyle: {
              color: "#18f4ff",
            },
            areaStyle: {
              color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
                { offset: 0, color: "#2b6c93" },
                { offset: 0.5, color: "rgba(182,229,187,0.3)" },
                { offset: 1, color: "rgba(182,229,187,0.1)" },
              ]),
            },
            lineStyle: {
              width: 2,
              shadowColor: "#18f4ff",
              shadowOffsetX: 1,
              // 设置阴影沿y轴偏移量为10
              shadowOffsetY: 1,
              // 设置阴影的模糊大小
              shadowBlur: 1
            },
            smooth: true,
            markLine: {
              data: [{ type: "average", name: "平均值" }],
              label: {
                color: '#18f4ff' // 设置标记线文字颜色为绿色
              }
            }
          }
        ]
      },
      oldStoreSales: {
        title: {

          subtext: '单位： 元',
          subtextStyle: {//设置副标题
            color: '#a6cdff'
          }

        },
        tooltip: {
          trigger: "axis"
        },
        calculable: true,
        xAxis: [
          {
            type: "category",
            axisLine: {
              lineStyle: {
                color: '#a6cdff'
              }
            },
            boundaryGap: false,
            data: this.oldX
          },
        ],
        grid: {
          x: 0,
          y: 45,
          x2: 20,
          y2: 0,
          containLabel: true
        },
        yAxis: [
          {
            type: "value",
            axisLabel: {
              formatter: "{value}"
            },
            axisLine: {
              lineStyle: {
                color: '#a6cdff'
              }
            },
          }
        ],
        series: [
          {
            name: "销售额",
            type: "line",
            data: this.oldS,
            // markPoint: {
            //   data: [
            //     { type: "max", name: "最大值" },
            //     { type: "min", name: "最小值" }
            //   ]
            // },
            label: {
              show: true, // 显示数据标签
              color: '#fff', // 设置数据标签文字颜色为红色
              position: 'top' // 设置数据标签的位置为拐点上方
            },
            itemStyle: {
              color: "#fff100"
            },
            areaStyle: {
              color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
                { offset: 0, color: "#474a3e" },
                { offset: 0.5, color: "rgba(182,229,187,0.3)" },
                { offset: 1, color: "rgba(182,229,187,0.1)" },
              ]),
            },
            lineStyle: {
              width: 2,
              shadowColor: "#474a3e",
              shadowOffsetX: 1,
              // 设置阴影沿y轴偏移量为10
              shadowOffsetY: 1,
              // 设置阴影的模糊大小
              shadowBlur: 1
            },
            smooth: true,
            markLine: {
              data: [{ type: "average", name: "平均值" }]
            }
          }
        ]
      },
      storeCount: {
        grid: {
          x: 0,
          y: 45,
          x2: 0,
          y2: 0,
          containLabel: true
        },

        tooltip: {
          trigger: "axis"
        },
        calculable: true,
        xAxis: {
          type: 'category',
          data: this.storeCountX,
          axisLine: {
            lineStyle: {
              color: '#a6cdff'
            }
          },
        },
        yAxis: {
          type: 'value',
          axisLine: {
            lineStyle: {
              color: '#a6cdff'
            }
          },
        },
        series: [{
          data: this.storeCountS,//let areaNames = mapWarehouseList.map(item => item.areaName);
          type: 'bar',
          barWidth: 20,
          itemStyle: {
            borderRadius: 2,
            color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: "#19f7ff" },
              { offset: 0.5, color: "#0fc1f9" },
              { offset: 1, color: "#079af4" },
            ]),
          },


        }]
      },
      afterSalePie: null,
      pickerOptions: {
        shortcuts: [{
          text: '最近一周',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', [start, end]);
          }
        }, {
          text: '最近一个月',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit('pick', [start, end]);
          }
        }, {
          text: '最近三个月',
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            picker.$emit('pick', [start, end]);
          }
        }]
      },
      areaId: '',
      dataView: false,
      time: '',
      username: '',
      activeList: [],
      startTime: "",
      endTime: "",
      count: {
        number: 1000
      },
      dateNow: dayjs().format("YYYY-MM-DD HH:mm:ss"),
      mapWarehouseList: [
        { area: 43, areaName: "宁乡壹", human: '陆晓峰', left: '49%', top: '62%', 'mobile': 15688254058 },
        { area: 44, areaName: "广东", human: '陈国有', left: '53%', top: '80%', 'mobile': 15019653368 },
        { area: 45, areaName: "广西", human: '-', left: '44%', top: '75%', 'mobile': "-" },
        { area: 52, areaName: "贵州", human: '王拥军', left: '43%', top: '65%', 'mobile': 18085137586 },
        { area: 53, areaName: "云南", human: '周学民', left: '30%', top: '66%', 'mobile': 15187872431 },
        {area: 56, areaName: "西安2仓", human: '杨剑益', left: '56%', top: '50%', 'mobile': 18085137586},
        {area: 58, areaName: "山西仓", human: '贺亚伟', left: '48%', top: '50%', 'mobile': 13272218620},
      ]
    };
  },
  mounted() {
    this.timer = setInterval(() => {
      this.dateNow = dayjs().format("YYYY-MM-DD HH:mm:ss");
    }, 1000);
    let data = JSON.parse(window.localStorage.getItem('userData'));
    this.username = data.userName;
    if (this.username == 'admin') {
      autofit.init({
        designHeight: 1080,
        designWidth: 1920,
        renderDom: ".screen",
        resize: true
      })
      this.dataView = true;
    }
  },
  created() {
    this.$api.areaLedgerAreaList().then(res => {
      this.warehouseList = res
    })
    // 获取当前日期和时间
    // const currentDate = new Date();

// 计算一周前的日期
//     const oneWeekAgo = new Date();
//     oneWeekAgo.setDate(currentDate.getDate() - 7);

// 格式化日期为需要的形式，例如 YYYY-MM-DD
//     const formatDate = (date) => {
//       const year = date.getFullYear();
//       const month = String(date.getMonth() + 1).padStart(2, '0');
//       const day = String(date.getDate()).padStart(2, '0');
//       return `${year}-${month}-${day}`;
//     };
//     this.endTime = formatDate(currentDate);
//     this.startTime = formatDate(oneWeekAgo);
//开始调用接口
    this.getSaleAfter();
    this.getLineData();
  },
  beforeDestroy() {
    clearInterval(this.timer);
    this.timer = null;
    autofit.off();
  },
  methods: {
    setWarehouse(v, i) {
      this.areaId = v
      this.activeList = [i];
      console.log(this.activeList)
      console.log(v, "11")
      this.getLineData()
      this.getSaleAfter()
    },
    refreshWare() {
      this.areaId = ''
      this.activeList = []
      this.getLineData()
      this.getSaleAfter()
    },
    async getSaleAfter() {
      this.afterSalePie = null
      const params = {
        areaId: this.areaId,
        startTime: this.startTime,
        endTime: this.endTime
      };
      const res = await this.$api.homeGetHomeAfterSaleInfo(params)
      let jsonArr = [];
      var keyArr = res.list.map(el => el.afterName);
      var valueArr = res.list.map(el => el.percentage);
      for (var i = 0; i < keyArr.length; i++) {
        var json = {};
        for (var j = 0; j < valueArr.length; j++) {
          if (i == j) {
            json.value = valueArr[j];
            json.name = keyArr[i];
            jsonArr.push(json);
          }
        }
      }
      this.afterSalePie = {
        tooltip: {
          trigger: 'item'
        },
        // legend: {
        //   left: 'center',
        //   top: 'bottom',
        //   textStyle: {
        //     color: '#a6cdff'
        //   }
        // },
        series: [
          {
            type: 'pie',
            radius: ['40%', '50%'],
            avoidLabelOverlap: false,
            center: ['55%', '40%'],
            data: jsonArr,
            itemStyle: {
              normal: {
                label: {
                  textStyle: {
                    color: '#19F5FF'
                  }
                }
              }
            },
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 1)'
              }
            }
          }
        ]
      };
    },
    timeSelect() {
      if (this.selectTime.length == 2) {
        this.startTime = dayjs(this.selectTime[0]).format('YYYY-MM-DD');
        this.endTime = dayjs(this.selectTime[1]).format('YYYY-MM-DD');
      }
      this.getLineData()
      this.getSaleAfter()
    },
    closeData() {
      this.$router.push({ 'path': '/order' });
      screenfull.exit();
    },
    toggleFullScreen() {
      screenfull.toggle();
    },
    getLineData() {
      this.newStoreSales.xAxis[0].data = null;
      this.storeCount.xAxis.data = null;
      this.oldStoreSales.xAxis[0].data = null
      // let myChart = echarts.init(document.getElementById('main'));
      let newParams = {
        areaId: this.areaId,
        startTime: this.startTime,
        endTime: this.endTime,
        orderType: 1
      }
      let oldParams = {
        areaId: this.areaId,
        startTime: this.startTime,
        endTime: this.endTime,
        orderType: 2
      }
      let storeCount = {
        areaId: this.areaId,
        startTime: this.startTime,
        endTime: this.endTime,
      }
      this.$api.homeGetHomeSellInfo(newParams).then(res => {
        if (res.listDate) {
          this.newStoreSales.xAxis[0].data = res.listDate;
          this.newStoreSales.series[0].data = res.listOrderSellMoney;
        } else {
          this.newStoreSales.xAxis[0].data = [0, 0, 0];
          this.newStoreSales.series[0].data = [0, 0, 0];

        }
      })
      this.$api.homeGetHomeSellInfo(oldParams).then(res => {
        if (res.listDate) {
          this.oldStoreSales.xAxis[0].data = res.listDate
          this.oldStoreSales.series[0].data = res.listOrderSellMoney

        } else {
          this.oldStoreSales.xAxis[0].data = [0, 0, 0]
          this.oldStoreSales.series[0].data = [0, 0, 0]
        }
      })
      this.$api.homeGetHomeSellInfo(storeCount).then(res => {
        if (res.listDate) {
          this.storeCount.xAxis.data = res.listDate;
          this.storeCount.series[0].data = res.listOrderCount;

        } else {
          this.storeCount.xAxis.data = [0, 0, 0];
          this.storeCount.series[0].data = [0, 0, 0];
        }


      })

      const params2 = {
        startTime: this.startTime,
        endTime: this.endTime,
        areaId: this.areaId
      }
      this.$api.homeGetHomePageInfo(params2).then(res => {
        this.homeData = res
      })
    },

  },
};
</script>

<style lang="less" scoped>
@textColor: #19F5FF;

.page-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.chartItem {
  width: 45%;
  height: 45%;

  &.item-2 {
    width: 100%;
    height: 100%;
  }
}

.screen {
  width: calc(100% - 60px);
  padding: 0 30px;
  height: 100%;
  background-image: url('@/assets/img/bg.jpg');
  background-size: 100% 100%;
  color: @textColor;
  // cursor: url("@/assets/img/mouse.jpg"),auto;
  cursor: pointer;
  position: fixed;
  z-index: 100000;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  margin: 0;
  z-index: 1000;
}

.header {
  width: 100%;
  // height:82px;
  position: relative;
  // background-image: url('@/assets/img/header.png');
  background-size: 100% 100%;
  color: #8596b4;

}

.headerInfo {
  width: 100%;
  // height: 50px;
  position: absolute;
  top: 0;
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  // padding: 18px 0;
  padding-top: 15px;
}

/deep/ .el-input__inner {
  border-color: @textColor !important;
  background: none !important;
}

/deep/ .el-range-input {
  background: none !important;
}

/deep/ .el-icon-date {
  color: @textColor !important;
}

/deep/ .el-date-editor .el-range-input {
  color: @textColor !important;
}

/deep/ .el-range-separator {
  color: @textColor !important;
  display: flex;
  align-items: center;
}

.date {
  background-color: red
}

.flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tiemSearch {
  width: 570px;
  height: 62px;
  background: url('../../assets/img/container.png');
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  padding: 10px;
  margin-top: 30px;
}

.warehouseList {
  width: calc(100% - 630px);
  height: 62px;
  background: url('../../assets/img/warehouseBg.png');
  background-size: 100% 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  margin-top: 30px;
  justify-content: space-around;
}

.warehouseItem {
  width: 170px;
  height: 48px;
  line-height: 48px;
  background: url('../../assets/img/wareshouseContainer.png');
  background-size: cover;
  text-align: center;
  font-size: 16px;
  border-radius: 2px;
  color: #00a2ed;
  overflow: hidden;
  cursor: pointer;
}

.warehouseItem:hover {
  color: white;
}

// .tiemSearch /deep/ .el-icon-date{
// 	display: none !important;
// }
.info {
  display: flex;
  justify-content: space-between;
  height: 832px;
  margin-top: 24px;
}

.mapBg {
  width: 780px;
  height: 100%;
  background: url(../../assets/img/mapBg.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.newOrderAmount,
.warehouseOrder {
  margin-bottom: 20px;
}

.newOrderAmount,
.oldOrderAmount,
.warehouseOrder,
.saleType {
  width: 470px;
  height: 356px;
  padding: 25px;
  background: url('../../assets/img/echartBg.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  overflow: hidden;
  position: relative;

}

.echartTitle {
  border-bottom: 0.5px solid #6a7182;
  // margin-bottom: 10px;
}

.echartTitleText {
  display: flex;
  align-items: center;
}

.echartTitleText > div:nth-child(1) {
  font-size: 24px;
  color: white;
}

.echartTitleText > div:nth-child(2) {
  font-size: 16px;
  color: #6a7182;
  margin-left: 20px;
}

.echartTitleLine {
  width: 100px;
  height: 6px;
  background-color: #00a2ed;
  margin-top: 20px;
  margin-bottom: -1px;
}

.map {
  width: 680px;
  height: 445px;
  // width: 770px;
  // height: 520px;
  background: url('../../assets/img/maps.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  margin: 0 auto;
  margin-top: 25px;
  margin-bottom: 60px;
  position: relative;
}

.item {

  position: absolute;

}

.item:hover .point {
  transform: scale(1.4);
}

.item:hover .warehouseInfo {
  display: block;
}

.point {
  width: 8px;
  height: 8px;
  margin: 10px auto;
  //    background-color: red;
  position: relative;
  border-radius: 50%;
}

.dotted {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 auto;
  background-color: #96F5FA;
  transition: 0.3s;
}

.dotted1 {
  /* 保证小盒子水平垂直居中 */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px #96F5FA;
  border-radius: 50%;
  animation: pulse 4s linear infinite;
  animation-delay: 0s !important;
}

.dotted2 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px #96F5FA;
  border-radius: 50%;
  animation: pulse 4s linear infinite;
  animation-delay: 1s !important;
}

.dotted3 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px #96F5FA;
  border-radius: 50%;
  animation: pulse 4s linear infinite;
  animation-delay: 2s !important;

}

@keyframes pulse {
  0% {
    width: 6px;
    height: 6px;
  }

  40% {
    width: 15px;
    height: 15px;
    opacity: 1;
  }

  100% {
    width: 30px;
    height: 30px;
    opacity: 0;
  }
}

.name {
  font-size: 16px;
}

.warehouseInfo {
  width: 140px;
  position: absolute;
  top: 0px;
  left: 40px;
  padding: 20px;
  background-color: rgba(0, 37, 107, 0.7);
  color: white;
  display: none;
  font-size: 14px;
  border: 0.5px solid #eee;
  border-radius: 4px;
}

.dataCount {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  margin: 0 20px;
}

.dataCount > div {
  width: 100%;
  height: 120px;
  background: url('../../assets/img/dataCountBg.jpg');
  background-size: 100%;
}

.dataCount > div > div:nth-child(1) {
  text-align: center;
  color: white;
  margin-top: 25px;
  margin-bottom: 10px;
}

.dataCount > div > div:nth-child(2) {
  display: flex;
  justify-content: center
}

.active {
  color: #fff !important;
  background-color: rgba(0, 37, 107, 0.9);
}

.compare {
  display: flex;
  justify-content: space-around;
  margin-top: 8px;
  color: white
}

// .newOrderAmount{
// 	.moving-element {
//     position: absolute;
//     top: 0;
//     left: 0;
// 	background-image:linear-gradient(141deg,#9fb8ad 0%,#1fc8db 51%,#2cb5e8 75%);
//     animation: moveAround 8s linear infinite;
// }
// }
// @keyframes moveAround {
//     0% {
//         top: 0px;
//         left: 0px;
// 		width: 10px;
//         height:1px;
//     }
//     25% {
//         top: 0px;
//         left: calc(100% - 10px);
// 		width: 1px;
//         height:10px;
//     }
//     50% {
//         top: calc(100% - 10px);
//         left: calc(100% - 10px);
// 		width: 10px;
//         height:1px;
//     }
//     100% {
//         top: calc(100% - 10px);
//         left: 0px;
// 		width: 10px;
//         height:1px;
//     }
// }
</style>
